package lab02.Test21;

public class Test {
    public static void main(String[] args) {
        char a='0';
        String string="13213213215001216540021699";
        System.out.println(getCharCount(a,string));
    }
    public static int getCharCount(char a,String string){
        int count=0;
        for (int i=0;i<string.length();i++){
            char temp=string.charAt(i);
            if (a==temp)
                count++;
        }
        return count;
    }
    }
